<?php
/**
 * In this file the exception class '\BF\PhpException' is defined.
 *
 * @author     Ulf Kadner <ulfikado@gmail.com>
 * @category   Beluga PHP5.3+ Framework
 * @copyright  (c) 2015, Ulfikado
 * @package    BF\Core
 * @since      2015-01-16 23:45
 * @subpackage Exceptions
 * @version    0.1
 */

namespace BF
{

   /**
    * This exception is used by framework error handler. It will only be thrown by the error handler, if a
    * catchable error occurs.
    *
    * <b>ATTENTION!</b> Never throw this exception inside your code!
    *
    * @since  v0.1
    */
   class PhpException extends \BF\ExceptionBase
   {

      # <editor-fold defaultstate="collapsed" desc=" - - >   P U B L I C   C O N S T R U C T O R   - - - - - - - - - - - - - - - - - -">

      /**
       * Init's a new instance. Don't use it inside you're code!
       *
       * @param string  $message  The error message.
       * @param integer $code     The error code.
       * @param integer $line     The error line.
       * @param string  $file     The error file.
       */
      public function __construct( $message, $code, $line, $file )
      {

         // Call the parent constructor
         parent::__construct( \strip_tags( $message ), $code );

         // Setting the error file manually.
         $this->file = $file;

         // Setting the error line manually.
         $this->line = $line;

      }

      # </editor-fold>

   }

}

